package wordit.impl.boardwise;

public class BoardLocation {

	private final int row;
	private final int column;

	public BoardLocation(int row, int column) {
		this.row = row;
		this.column = column;
	}

	public int getRow() {
		return row;
	}

	public int getColumn() {
		return column;
	}

	public boolean equals(Object other) {
		if (!(other instanceof BoardLocation))
			return false;
		
		BoardLocation otherLocation = (BoardLocation) other;
		
		if (otherLocation.getRow() != getRow())
			return false;
		if (otherLocation.getColumn() != getColumn())
			return false;
		
		return true;
	}

	public String toString() {
		return "(" + row + "," + column + ")";
	}
}
